home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2001 May / SGI Freeware 2001 May - Disc 3.iso / dist / fw_openssl.idb / usr / freeware / lib / openssl / doc / c-indentation.el.z / c-indentation.el
Encoding:
Text File  |  2001-01-10  |  1.7 KB  |  47 lines

  1. ; This Emacs Lisp file defines a C indentation style that closely
  2. ; follows most aspects of the one that is used throughout SSLeay,
  3. ; and hence in OpenSSL.
  4. ; This definition is for the "CC mode" package, which is the default
  5. ; mode for editing C source files in Emacs 20, not for the older
  6. ; c-mode.el (which was the default in less recent releaes of Emacs 19).
  7. ;
  8. ; Copy the definition in your .emacs file or use M-x eval-buffer.
  9. ; To activate this indentation style, visit a C file, type
  10. ; M-x c-set-style <RET> (or C-c . for short), and enter "eay".
  11. ; To toggle the auto-newline feature of CC mode, type C-c C-a.
  12. ;
  13. ; Apparently statement blocks that are not introduced by a statement
  14. ; such as "if" and that are not the body of a function cannot
  15. ; be handled too well by CC mode with this indentation style.
  16. ; The style defined below does not indent them at all.
  17. ; To insert tabs manually, prefix them with ^Q (the "quoted-insert"
  18. ; command of Emacs).  If you know a solution to this problem
  19. ; or find other problems with this indentation style definition,
  20. ; please send e-mail to bodo@openssl.org.
  21.  
  22. (c-add-style "eay"
  23.          '((c-basic-offset . 8)
  24.            (c-comment-only-line-offset . 0)
  25.            (c-hanging-braces-alist)
  26.            (c-offsets-alist    . ((defun-open . +)
  27.                    (defun-block-intro . 0)
  28.                    (class-open . +)
  29.                    (class-close . +)
  30.                    (block-open . 0)
  31.                    (block-close . 0)
  32.                    (substatement-open . +)
  33.                    (statement . 0)
  34.                    (statement-block-intro . 0)
  35.                    (statement-case-open . +)
  36.                    (statement-case-intro . +)
  37.                    (case-label . -)
  38.                    (label . -)
  39.                    (arglist-cont-nonempty . +)
  40.                    (topmost-intro . -)
  41.                    (brace-list-close . 0)
  42.                    (brace-list-intro . 0)
  43.                    (brace-list-open . +)
  44.                    ))))
  45.  
  46.